package org.example.aspect;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

@Slf4j
@Aspect
@Component
public class LogAspect {

    @Pointcut("execution(* org.example.controller.TestController.*(..))")
    public void pointCut() {

    }


    @After("pointCut()")
    public void before() {
        log.info("log before");
    }


    @Before("pointCut()")
    public void after() {
        log.info("log after");
    }
}
